home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / amos / jwindows.lha / Music.Asc < prev    next >
Text File  |  1996-04-25  |  3KB  |  89 lines

  1. '**********************************************************
  2. '* 
  3. '*   Tracker Player  
  4. '* 
  5. '**********************************************************
  6.  
  7. '   This a very simple little Workbench program that plays tracker modules 
  8. ' (everyones got a few of these kicking around their hard discs...)
  9.  
  10. '   The code was knocked up in about 20 minutes - the interface was drawn
  11. ' into GadToolsBox, and the code ported accross in the normal way. 
  12. '   There isn't much added - just the definition of the file requester 
  13. ' and the _HANDLEMUSICGADS procedure which actually makes the program
  14. ' play the modules, bring up the requester, etc. 
  15.  
  16. '   To compile this, uncomment the Screen Open line from the _INITIALIZE 
  17. ' procedure, remove the Amos To Front line from _CLEANUP, and compile as a 
  18. ' Workbench program, with 'Amos to back on boot' and 'no default screen' 
  19. ' selected.  
  20.  
  21. 'these are all from GadToolsBox
  22. Global _SCRAPTAGS,SCRAPTAGS,_PORTLIST,_MESSLIST
  23. Global PATH$,OSVER
  24. Global FHEIGHT,FWIDTH,MBAR,OX,OY,SW,SH
  25. Dim _MUSICGADS(4)
  26. Global _MUSICGADS()
  27. Global _FILESTR,_FILESEL,_PLAY,_STOP
  28. Dim _MUSICZOOM(1)
  29. Global _MUSICZOOM()
  30. Global _MUSICWIND
  31.  
  32. '** this is used for the asl file requester  
  33.  
  34. Global MYASL
  35.  
  36. On Error Proc _CLEANUP
  37. _INITIALIZE
  38. _GUIDATA
  39. _SETUPALL
  40. _SETPORTS
  41.  
  42. '** here we create the file requester, with a few appropriate tags.
  43. 'Note that this is done AFTER opening the window otherwise ASLFR_Window
  44. 'would be rather pointless.
  45. 'Remember to add a J Free Asl Requester line to the _CLEANUP routine 
  46.  
  47. J Tag _SCRAPTAGS,1,Equ("ASLFR_TitleText"),J Make String("Select a med file")
  48. J Tag Equ("ASLFR_SleepWindow"),True
  49. J Tag Equ("ASLFR_Window"),_MUSICWIND
  50. J Tag Equ("ASLFR_RejectIcons"),True
  51. J Tag 0,0
  52. MYASL=J Create Asl Requester(Equ("ASL_FileRequest"),_SCRAPTAGS)
  53.  
  54. Do 
  55.    K=J Wait Message
  56.    While K
  57.       C=J Tag Data(_MESSLIST,1)
  58.       If C=Equ("IDCMP_CLOSEWINDOW")
  59.          _CLEANUP
  60.       Else If C=Equ("IDCMP_REFRESHWINDOW")
  61.          _DOREFRESH
  62.          
  63.          '** these two lines are added by me - if a gadget is clicked, my gadget
  64.          ' handling routine is called 
  65.       Else If C=Equ("IDCMP_GADGETUP")
  66.          _HANDLEMUSICGADS
  67.       End If 
  68.       K=J Next Message
  69.    Wend 
  70. Loop 
  71.  
  72. '** This code is totally machine generated and is nothing to do with me... 
  73. 'by Gadtools 
  74. Procedure _INITIALIZE
  75. Procedure _SETUPALL
  76. Procedure _GUIDATA
  77. Procedure _MAKEMUSICGADS
  78. Procedure _MAKEMUSICWIND[SC]
  79. Procedure _MUSICRENDER
  80. Procedure _DOREFRESH
  81. Procedure _SETPORTS
  82. Procedure _FREEWIND[W,G,M,A,C]
  83. Procedure _CLEANUP
  84.  
  85. '** This procedure is mine - it handles the user clicking gadgets
  86.  
  87. Procedure _HANDLEMUSICGADS
  88.  
  89.